<template>
  <div>
    <common-head title="添加联系人"></common-head>
    <div class="wrap">
      <van-address-edit
        :area-list="$store.state.areaList"
        show-postal
        show-set-default
        :area-columns-placeholder="['请选择', '请选择', '请选择']"
        @save="onSave"
      />
    </div>
  </div>
</template>

<script>
import CommonHead from 'components/CommonHead'
import { mapMutations } from 'vuex'
import { Toast } from 'vant'
export default {
  methods: {
    onSave (content) {
      this.addContact(JSON.parse(JSON.stringify(content)))
      Toast('添加成功')
    },
    ...mapMutations('contact', ['addContact'])
  },
  components: {
    CommonHead
  }
}
</script>

<style lang="scss" scoped>

</style>